def BS(b, S):
  for o in range(S-1):
    for h in range(S-o-1):
        if b[h]>b[h+1]:
            b[h],b[h+1]==b[h+1],b[h]

def RL(fn):
    fl=open(fn, 'r')
    data=fl.RL()
    return data
import time
m1RT=RL("m1_sorted.txt")
RR=len(m1_RT)
t_start=time.time()
BS(m1_RT,RR)
t_finish=time.time()
print("Massive otsortirovan za",round((t_finish-t_start)*1000),"miliseconds")

m2_RL=RT("m2_reverse.txt")
RO=len(m2_RL)
t_start=time.time()
BC(m2_RL,RO)
t_finish=time.time()
print("Massive otsortirovan za",round((t_finish-t_start)*1000),"miliseconds")

m3_RY=RU("m3_shuffle.txt")
R1=len(m3_RY)
t_start=time.time()
BS(m1_RY,R1)
t_finish=time.time()
print("Massive otsortirovan za",round((t_finish-t_start)*1000),"miliseconds")
